import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2022-12-23
 * Time:20:05
 */
@WebServlet("/getParameter")
public class getParameter extends HttpServlet {
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf8");
        String studentId=req.getParameter("StudentId");
        String studentName=req.getParameter("StudentName");
        System.out.println(studentId);
        System.out.println(studentName);
        resp.getWriter().write(studentId+":"+studentName);
    }
}
